import './tabbar.css'
import Link from 'next/link'

export default function Tabbar({ activeIndex }) {
  return (
    <div className="tab1">
      <div className="tabbar">
        <div className={ `tabbar-item ${ activeIndex === '0' ? 'active' : '' }` }>
          <Link href="/tab1">
            <a>首页</a>
          </Link>
        </div>
        <div className={ `tabbar-item ${ activeIndex === '1' ? 'active' : '' }` }>
          <Link href="/tab2">
            <a>购物车</a>
          </Link>
        </div>
        <div className={ `tabbar-item ${ activeIndex === '2' ? 'active' : '' }` }>
          <Link href="/tab3">
            <a>我的</a>
          </Link>
        </div>
      </div>
    </div>
  )
}